import scrapy
import time

class Dy2020(scrapy.Spider):
  name = 'Dy2020'
  dalay = 1
  page = 102437
  target = 100

  allowed_domains = ['www.dy2018.com']
  start_urls = ['https://www.dy2018.com/i/102437.html']

  def parse(self, response):
    for i in range(0, 100):
      page = self.page + i
      yield scrapy.Request('https://www.dy2018.com/i/' + str(page) + '.html',callback=self.parse_detail)
     
  def parse_detail(self, response):
    titles = response.xpath('//div[@class="title_all"]/h1/text()').extract()[0]
    print(titles)
      